//
//  MenuViewController.m
//  Products_B
//
//  Created by lanou on 16/5/27.
//  Copyright © 2016年 朋学友. All rights reserved.
//

#import "MenuViewController.h"
#import "ScrollViewManager.h"
#import "LBTModel.h"
#define kMenuUrl @"http://api.izhangchu.com/?methodName=SceneHome&token=0&user_id=0&version=4.4"
@interface MenuViewController ()
@property (nonatomic, strong)NSMutableArray *LBTModelArray;
@end

@implementation MenuViewController

- (void)viewDidLoad {
    [super viewDidLoad];
   //  隐藏tableBar
    self.navigationController.navigationBar.hidden = YES;
    
    //  创建头视图
    //  网络请求
    [self requestData];
    
    
    
}

#pragma mark - 请求网络数据 -
- (void)requestData{
    
   [RequestManager requestWithUrl:kMenuUrl requestType:(RequestTypePOST) parDic:nil finish:^(NSData *data) {
       NSDictionary *jsonDic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
       
       //  轮播图model数组
       self.LBTModelArray = [LBTModel modelConfigureWithDic:jsonDic];
       
       //  轮播图的图片url数组
       NSMutableArray *lBTPicArray = [NSMutableArray array];
       for (LBTModel *model in lBTPicArray) {
           [lBTPicArray addObject:model.banner_picture];
       }
       
       
       
   } error:nil];

}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
